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

Duplicate key error during Celery task #118

Open
ghost opened this issue Jan 4, 2016 · 0 comments
Open

Duplicate key error during Celery task #118

ghost opened this issue Jan 4, 2016 · 0 comments

Comments

@ghost
Copy link

ghost commented Jan 4, 2016

  File "/var/www/tracpro/env/local/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/var/www/tracpro/env/local/lib/python2.7/site-packages/celery/app/trace.py", line 438, in __protected_call__
    return self.run(*args, **kwargs)
  File "/var/www/tracpro/source/tracpro/contacts/tasks.py", line 35, in push_contact_change
    sync_push_contact(org, contact, change_type, [region_uuids, group_uuids])
  File "/var/www/tracpro/env/src/dash/dash/utils/sync.py", line 36, in sync_push_contact
    contact.save()
  File "/var/www/tracpro/source/tracpro/contacts/models.py", line 207, in save
    contact = super(Contact, self).save(*args, **kwargs)
  File "/var/www/tracpro/env/local/lib/python2.7/site-packages/django/db/models/base.py", line 734, in save
    force_update=force_update, update_fields=update_fields)
  File "/var/www/tracpro/env/local/lib/python2.7/site-packages/django/db/models/base.py", line 762, in save_base
    updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
  File "/var/www/tracpro/env/local/lib/python2.7/site-packages/django/db/models/base.py", line 827, in _save_table
    forced_update)
  File "/var/www/tracpro/env/local/lib/python2.7/site-packages/django/db/models/base.py", line 877, in _do_update
    return filtered._update(values) > 0
  File "/var/www/tracpro/env/local/lib/python2.7/site-packages/django/db/models/query.py", line 580, in _update
    return query.get_compiler(self.db).execute_sql(CURSOR)
  File "/var/www/tracpro/env/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 1062, in execute_sql
    cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
  File "/var/www/tracpro/env/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 840, in execute_sql
    cursor.execute(sql, params)
  File "/var/www/tracpro/env/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/var/www/tracpro/env/local/lib/python2.7/site-packages/django/db/utils.py", line 98, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/var/www/tracpro/env/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
IntegrityError: duplicate key value violates unique constraint "contacts_contact_uuid_key"
DETAIL:  Key (uuid)=(19a798b8-0aa2-46f4-b617-b189a3e0adf7) already exists.
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

0 participants