-
Notifications
You must be signed in to change notification settings - Fork 46
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
[ADD] connector_voicent_helpdesk_ticket #97
[ADD] connector_voicent_helpdesk_ticket #97
Conversation
@max3903 I need your help in How I can execute queue job based on a specific condition in the scheduler. Because when we change the status of the ticket it will create a job based on functionality and worker is execute the job at that time. How I can stop that execution of that job when changed the state of the ticket. |
@murtuzasaleh When the job is executed, first thing you want to do is check if current time >= Next Call. Unless @guewen has a more elegant way to handle this. |
As we discussed there are multiple voicent backend based on the checked is_active field call_line_id But what if there are multiple lines with the same stage, Which stage I will assign in queue job? |
@murtuzasaleh If you have multiple line with the same stage, they should create multiple job. |
d8f11a6
to
7f33690
Compare
d39208d
to
a2590c9
Compare
You can put an |
Keep this in mind: queue.job records are only supposed to be the representation of a method's delayed execution. This is not where you want to store your business logic, attach your files, ... You have to consider it as a black box to execute a method asynchronously - and only this -, method which can be executed more than once (idempotent; so check the state when the job starts), jobs are deleted after some time... Sometimes, you may want to create a new model to actually contains the state of your business logic (draft, sent, done, whatever), link it to attachments, add relations, ... and make your jobs work on a record of this model (example: |
c71effa
to
13744ba
Compare
str(call_line.backend_id.port), | ||
call_line.backend_id.callerid, | ||
str(call_line.backend_id.line)) | ||
status = voicent_obj.checkStatus(voicent_campaign) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@guewen How can we get this job to be retried if the status returned by Voicent is not OK?
You can raise a RetryableJobError with an optional number of seconds before
the retry
Le jeu. 20 juin 2019 à 22:24, Maxime Chambreuil <notifications@github.com>
a écrit :
… ***@***.**** commented on this pull request.
------------------------------
In connector_voicent_helpdesk_ticket/models/helpdesk_ticket.py
<#97 (comment)>:
> +
+
+class HelpdeskTicket(models.Model):
+ _inherit = 'helpdesk.ticket'
+
+ @job
+ @api.multi
+ def check_status_job(self, voicent_campaign, helpdesk_ticket,
+ call_line):
+ for rec in self:
+ voicent_obj = voicent.Voicent(
+ call_line.backend_id.host,
+ str(call_line.backend_id.port),
+ call_line.backend_id.callerid,
+ str(call_line.backend_id.line))
+ status = voicent_obj.checkStatus(voicent_campaign)
@guewen <https://github.com/guewen> How can we get this job to be retried
if the status returned by Voicent is not OK?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#97?email_source=notifications&email_token=AADF3R26XVA5LSKHPQ6HDMDP3PRPRA5CNFSM4HQC64QKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB4GQZQQ#pullrequestreview-252513474>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADF3RZKJYZ7IWRBJVUUWU3P3PRPRANCNFSM4HQC64QA>
.
|
13744ba
to
fb7968f
Compare
Voicent Helpdesk Ticket Connector
Odoo Helpdesk App does not provide an automated way to trigger phone calls when a ticket reaches a specific stage in the process.
For companies with a large number of tickets or when a ticket impacts many people, calling everyone one by one is a time-consuming option.
This module aims to automate calls to a customer or impacted third parties when a ticket reaches a specific stage.