Find Jobs
Hire Freelancers

Create Python project querying Postgres and calling a web service.

$30-250 USD

Terminado
Publicado hace más de 9 años

$30-250 USD

Pagado a la entrega
Background The purpose of this task is to enable a postgres function or trigger function to send all kinds of emails to customers. The emails that need to get sent to customers will either be triggered by a database update (welcome email when a new customer registeres, email with invoice as PDF when a customer decides to buy our service, startup mail when we register a payment from a customer, etc.). The architecture will be that postgres functions that have decided to send an email, will store an "action" in the "actions" table. The purpose of this task will be to read the actions table and call an apropriate [login to view URL] action based upon the action. The action parameters will be provided in JSON format to [login to view URL] so Ultradox can create the document (HTML and/or PDF) based upon a Google Doc template and send it to the customer. Task description Create a python standalone program, which will be run from a cron job (not as a web page). Get this program to work on our test-server. The program should either start working by getting (re)started by a cron job or by getting a postgres notification ([login to view URL]). Here is an example of how to handle these notifications in Python: [login to view URL] When the program is started it should a query on the following table: create table actions (id serial primary key, customer_id int, created timestamp, templateUrl varchar(9999), action_parameters hstore, completed timestamp(6), failed boolean NOT NULL DEFAULT false, message_from_executor varchar(9999), document_links array); The query to run: select * from actions where failed = false and completed is null; The program should take each row and call the templateUrl with a HTTP post which contains all the values from the hstore column as a json document. The templateUrl will be to [login to view URL], which takes care of creating an email with or without a PDF as attachment and sending that email. Please see this ultradox for initial testing: [login to view URL] That ultradox above can be run by visiting the following link: [login to view URL] (example with parameter provided with GET, not POST and JSON) That will send me an email with the variable text "thisisatest". Please, copy the ultradox above to make your own modifications. The json documentation of Ultradox can be found here: [login to view URL] Here is a short description on how to use the hstore column on heroku postgres: [login to view URL] Unfortunatelly we are using postgres 9.1, so the database does not have functionality to convert rows to json. After calling ultradox, the python program should put the result (as seen on this page: [login to view URL]) into the actions table in column "message_from_executor" and set the completed timestamp to now. Or it should set the "failed" column to true in case that ultradox reports an error. Please also tell me how to get the python program to run daily (command line to create daily cron job). Please make the python program transaction safe, so if it is invoked twice at the same time, then the actions will not get performed twice. Possibly by creating a "locked" column in the actions table. I will provide login details to our Linux test-server where you need to get your solution to run to complete this project. You only get 3 attempts to complete this project, so please don't ask me to test half-finished projects, which bugs that you should have caught yourself. There is, however, no limit to the number of relevant questions you can ask me. You need to complete this project within 4 days from me accepting your offer.
ID del proyecto: 6451143

Información sobre el proyecto

9 propuestas
Proyecto remoto
Activo hace 10 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
Hi, Thanks for providing such a clear and detailed description of your requirement. I have read and understood your requirements and will be able to develop this python script using the 'requests', 'py-postgresql' or another DB-API 2 compliant interface and 'json' libraries. I will be perform testing with the most common test scenarios as inferred from your description. In terms of transaction safety, I think we can implement functionality such that when an un-actioned item is read, the completed column is populated with an known static date e.g. '1-JAN-2000' in the past and when a new action is read the query also filters "AND completed != '1-JAN-2000'. I am particularly attracted to this project because of your clear and concise description of the problem and also because this will provide me the opportunity to work with ultradox, which I found interesting. Thanks for reviewing my proposal. Regards, Shuaib
$100 USD en 3 días
0,0 (0 comentarios)
0,0
0,0
9 freelancers están ofertando un promedio de $269 USD por este trabajo
Avatar del usuario
Hello! Although I am new to Freelancer.com, I am an experienced programmer with a Master's degree in Computer Science. After reading your proposal for I have created software in the past using Python many times, and will gladly provide code for an example. Thank you for your consideration, and I hope to work with you soon.
$277 USD en 5 días
5,0 (3 comentarios)
4,0
4,0
Avatar del usuario
Hi, I haven't used ultradox before, so it'd have some learning curve, 4 days might be very tight enough. I am a python programmer and a sysadmin so I know what you're talking about and how to get the script ready for you. It's just that 4 days might be squeezing in too much which might reduce the productivity on the app and be very little time for bugfixing, after you review it. I wouldn't ask you to review it multiples, 2 revisions should do it. But in the mean time I might poke you to get some dtails about the process and the script's execution. Regards, ExSys
$250 USD en 3 días
4,7 (6 comentarios)
3,0
3,0
Avatar del usuario
Hi David, Hope you are doing fine. We've worked previously and you liked my coding style and I'm sure we can work this project out too. I can assure you the same quality stuff from my side with clean code and proper working application. I've been doing web development for quite sometime and I've extensive experience in developing web applications using different kind of technologies i.e python/django/php/rubyOnRails and using different libraries jQuery, prototype and likes, this seems to be the same level of job and based on my experience I will be able to help you with this site as well. Please have a look at my profile and you will see lots of python related projects that I've done and great reviews from my clients. Please feel free to ask if you've any questions, I'm pretty sure it will be wonderful experience working with you again. Thanks
$222 USD en 4 días
5,0 (3 comentarios)
2,6
2,6
Avatar del usuario
La propuesta todavía no ha sido proveída
$100 USD en 4 días
5,0 (3 comentarios)
1,1
1,1
Avatar del usuario
Hello. More 20 years programming experience. Regards. -----------------------------------------------------------------------------------------------------------------------------------------------
$155 USD en 3 días
5,0 (1 comentario)
0,9
0,9
Avatar del usuario
i have 8+ years of experience. Can we discuss the project. Please initiate a chat with me so that we can discuss the project at a broader level. Why you should hire me- 1. I have a very good communication skills so i would understand you better. 2. Error free work will be there 3. Look at my profile once before hiring me. Please see my reviews https://www.freelancer.com/u/fattahaabdul.html
$631 USD en 3 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
Hi, I’m a London based software engineer with more than 10 years of experience working on enterprise level applications builded with Python, Java and PHP. I can guarantee highest code quality (best design patterns, libraries and framework) which makes my solution easy to maintain and extend with highest performance. I have a lot of experience with building and using different kind of applications including desktop, linux services or web based. If you have any questions feel free to contact with me.
$244 USD en 2 días
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de DENMARK
Copenhagen, Denmark
5,0
165
Forma de pago verificada
Miembro desde ene 11, 2010

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.