1

I am working on a project, which allows many users to upload files (csv,xls,xslx,xml), the files should be validated, and if valid, the data is stored in the database.

The files have strict naming convention and it will be validated during upload. The file content could be very long, so it cannot be validated during a request, this task will be pushed to a queue.

I would like to give the users some UI, where they can see their uploaded files. It is a table with a Status column, which is changing like: Uploaded, Validating, Importing to DB, Success, or possible Error after each step.

My questions is how can I monitor the jobs and display their status ?

2
  • it's simple,just consider a status column in your database which shows current step for each file you want. Commented Dec 15, 2014 at 7:25
  • I haven't dealt with queues before, and I am having trouble getting the status of the job and any return error from the job.
    – dmateev
    Commented Dec 15, 2014 at 7:30

1 Answer 1

0

Here is my solution:

I create a table for this let's call it: files which has these columns:

id | url | status | error |created_at | updated_at

status's default value is zero: file uploaded and needs validating.when it's 1: it's validated and successfully updated.

error's default value is zero: file has no errors. and each value for error represents it's correspond error(for instance 1 shows file size is too big).

But you can have no error column. A status could show all of these by itself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.