horilla-opensource / horilla

Horilla is a free and open source HR software.
https://www.horilla.com/
GNU Lesser General Public License v2.1
166 stars 116 forks source link

Make migration postgresql. #205

Closed muhammadatifkhan03 closed 1 month ago

muhammadatifkhan03 commented 3 months ago

I'm getting these issues when trying to run makemigrations with recent changes.

Execution of job "block_unblock_disciplinary (trigger: interval[0:00:10], next run at: 2024-06-11 01:41:45 IST)" skipped: maximum number of running instances reached (1)
Job "auto_check_out (trigger: interval[0:00:30], next run at: 2024-06-11 01:42:05 IST)" raised an exception
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/apscheduler/executors/base.py", line 125, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/home/runner/work/nesl-hrm/nesl-hrm/attendance/scheduler.py", line 11, in auto_check_out
    from attendance.views.clock_in_out import clock_out_attendance_and_activity
  File "/home/runner/work/nesl-hrm/nesl-hrm/attendance/views/clock_in_out.py", line 19, in <module>
    from attendance.views.views import (
  File "/home/runner/work/nesl-hrm/nesl-hrm/attendance/views/views.py", line 32, in <module>
    from attendance.filters import (
ImportError: cannot import name 'AttendanceActivityFilter' from 'attendance.filters' (/home/runner/work/nesl-hrm/nesl-hrm/attendance/filters.py)

followed by many of the same errors.

  File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/django/db/backends/postgresql/base.py", line 275, in get_new_connection
    connection = self.Database.connect(**conn_params)
  File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/psycopg2/__init__.py", line 122, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: connection to server at "IP address", port 5432 failed: Connection timed out
    Is the server running on that host and accepting TCP/IP connections?
The above exception was the direct cause of the following exception:

I'm not sure whats the issue? Please support in setting postgres db.

muhammadatifkhan03 commented 3 months ago
Execution of job "block_unblock_disciplinary (trigger: interval[0:00:10], next run at: 2024-06-11 01:53:45 IST)" skipped: maximum number of running instances reached (1)
Execution of job "block_unblock_disciplinary (trigger: interval[0:00:10], next run at: 2024-06-11 01:53:55 IST)" skipped: maximum number of running instances reached (1)
Execution of job "block_unblock_disciplinary (trigger: interval[0:00:10], next run at: 2024-06-11 01:54:05 IST)" skipped: maximum number of running instances reached (1)
Execution of job "auto_check_out (trigger: interval[0:00:30], next run at: 2024-06-11 01:54:05 IST)" skipped: maximum number of running instances reached (1)
Execution of job "block_unblock_disciplinary (trigger: interval[0:00:10], next run at: 2024-06-11 01:54:15 IST)" skipped: maximum number of running instances reached (1)

getting this thousand times.

horilla-opensource commented 3 months ago

Hi @muhammadatifkhan03 , From the log, we understand that your connection with postgresql is not correctly established. Can you confirm if the postgresql installation is successful in the system?

With Regards, Team Horilla

muhammadatifkhan03 commented 3 months ago

Hi I checked on that it seems like there's some other issues it first shows scheduler issue then self close connection error. I'm not sure why it is behaving like this. I have tried to connect it locally and then migrations again still the same error.

On Tue, Jun 11, 2024, 10:41 PM Horilla @.***> wrote:

Hi @muhammadatifkhan03 https://github.com/muhammadatifkhan03 , From the log, we understand that your connection with postgresql is not correctly established. Can you confirm if the postgresql installation is successful in the system?

With Regards, Team Horilla

— Reply to this email directly, view it on GitHub https://github.com/horilla-opensource/horilla/issues/205#issuecomment-2161294578, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQCJZGLFHW4S5ESGLIXGJ73ZG4ZC5AVCNFSM6AAAAABJC7U6R6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRRGI4TINJXHA . You are receiving this because you were mentioned.Message ID: @.***>

horilla-opensource commented 3 months ago

The scheduler issue can be neglected as it won't stop the migration from completion. Can you share with the the details of the database configuration you have added in the database? From the log that you have shared, I think you have made mistake in the configuration section.

With Regards, Team Horilla

horilla-opensource commented 1 month ago

Hi @muhammadatifkhan03 , We are closing this issue due to inactivity. It seems that there hasn't been any recent activity or discussion, and we believe it may have been resolved or is no longer relevant. If you feel this issue is still important and should be addressed, please feel free to reopen it or create a new issue with updated details.

With Regards, Team Horilla