Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change sync_acct to continue when it hits duplicate keys #68

Closed
stephenlienharrell opened this issue Jan 6, 2025 · 1 comment
Closed

Comments

@stephenlienharrell
Copy link
Member

/hpcstats//accounting/2024-11-05.log
2024-11-05
Total number of existing entries: 2453
Total number of new entries: 685
Traceback (most recent call last):
File "/home/hpcstats/tacc_stats/dbload/sync_acct.py", line 94, in
sync_acct(entry.path, str(startdate.date()))
File "/home/hpcstats/tacc_stats/dbload/sync_acct.py", line 61, in sync_acct
mgr.copy(df.values.tolist())
File "/usr/local/lib/python3.6/site-packages/pgcopy/copy.py", line 296, in copy
self.copystream(datastream)
File "/usr/local/lib/python3.6/site-packages/pgcopy/copy.py", line 338, in copystream
raise e
File "/usr/local/lib/python3.6/site-packages/pgcopy/copy.py", line 334, in copystream
cursor.copy_expert(sql, datastream)
psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "job_data_pkey"
DETAIL: Key (jid)=(1214685) already exists.
CONTEXT: COPY job_data, line 1

@stephenlienharrell
Copy link
Member Author

This is a duplicate of #56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant