gaiacoop / django-huey

A django integration for huey task queue that supports multi queue management
MIT License
67 stars 5 forks source link

Connection failed: connection to server at "127.0.0.1", port 5432 #20

Closed edmundrotimi closed 4 months ago

edmundrotimi commented 4 months ago

I keep getting "connection failed: connection to server at "127.0.0.1", port 5432 failed: FATAL: password authentication failed for user "root" connection to server" when running my task in production. This does not happen in local development.

  @db_periodic_task(crontab(minute='*/1'), queue='application_expiration')
  def parcel_expiration_task():
      # current date and time
      current_timestamp = timezone.localtime(timezone.now())

      # get all event
      get_events = Event.objects.order_by('-creation_time').filter(
         time_ends__lt=current_timestamp
      )

      if get_events.exists():
          ...