Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

Commit

Permalink
fix syntax errors
Browse files Browse the repository at this point in the history
  • Loading branch information
goncalotomas committed Nov 30, 2018
1 parent 3e2cadc commit 5cfeeb2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/fmke_populate.erl
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ handle_cast(_Msg, State) ->
{noreply, State}.

do_add(redis_cluster, _, Entity, Fields) ->
Updates = gen_riak_updates(Entity, Fields),
Updates = gen_redis_updates(Entity, Fields),
eredis_cluster:qmn(Updates),
ok;

do_add(redis_crdb, _, Entity, Fields) ->
Pid = fmke_db_conn_manager:checkout(),
Updates = gen_riak_updates(Entity, Fields),
Updates = gen_redis_updates(Entity, Fields),
eredis:qp(Pid, Updates),
fmke_db_conn_manager:checkin(Pid),
ok;
Expand Down Expand Up @@ -90,9 +90,9 @@ gen_redis_updates(prescription, [Id, PatientId, PrescriberId, PharmacyId, DatePr
["HMSET", Key, ?PRESCRIPTION_ID_KEY, Id, ?PRESCRIPTION_PATIENT_ID_KEY, PatientId,
?PRESCRIPTION_PRESCRIBER_ID_KEY, PrescriberId, ?PRESCRIPTION_PHARMACY_ID_KEY, PharmacyId,
?PRESCRIPTION_DATE_PRESCRIBED_KEY, DatePrescribed, ?PRESCRIPTION_DRUGS_KEY, encode_drugs_redis(Drugs)],
["SADD", gen_redis_prescriptions_key(patient, PatId), Key],
["SADD", gen_redis_prescriptions_key(pharmacy, PharmId), Key],
["SADD", gen_redis_prescriptions_key(staff, DocId), Key]
["SADD", gen_redis_prescriptions_key(patient, PatientId), Key],
["SADD", gen_redis_prescriptions_key(pharmacy, PharmacyId), Key],
["SADD", gen_redis_prescriptions_key(staff, PrescriberId), Key]
];
gen_redis_updates(staff, [Id, Name, Address, Speciality]) ->
Key = "staff_" ++ integer_to_list(Id),
Expand Down

0 comments on commit 5cfeeb2

Please sign in to comment.