Skip to content

Commit fbd0650

Browse files
committed
miscellanea
1 parent b15ccfc commit fbd0650

File tree

6 files changed

+45
-1
lines changed

6 files changed

+45
-1
lines changed

lib/algora/accounts/schemas/user.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ defmodule Algora.Accounts.User do
132132
field :repo_contributions_synced, :boolean, default: false
133133
field :linkedin_url_attempted, :boolean, default: false
134134
field :linkedin_meta_attempted, :boolean, default: false
135+
field :readme_attempted, :boolean, default: false
135136

136137
# Work arrangement preferences
137138
field :open_to_remote, :boolean, default: false
@@ -156,6 +157,9 @@ defmodule Algora.Accounts.User do
156157
field :work_auth_us, :boolean, default: false
157158
field :work_auth_eu, :boolean, default: false
158159

160+
# Resume
161+
field :resume_url, :string
162+
159163
# Poaching targets - stores repos and companies to poach from
160164
field :poaching_targets, :string
161165

lib/algora/cloud.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ defmodule Algora.Cloud do
4242
end
4343

4444
def notify_match(attrs) do
45-
call(AlgoraCloud.Talent.Jobs.SendJobMatchEmail, :send, [attrs])
45+
# call(AlgoraCloud.Talent.Jobs.SendJobMatchEmail, :send, [attrs])
46+
match = Algora.Repo.get_by(Algora.Matches.JobMatch, user_id: attrs.user_id, job_posting_id: attrs.job_posting_id)
47+
call(AlgoraCloud.EmailScheduler, :schedule_email, [:job_drip, match.id])
4648
end
4749

4850
def notify_candidate_like(attrs) do

lib/algora/settings/settings.ex

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,17 @@ defmodule Algora.Settings do
344344
set("org_members:#{org_handle}", %{"members" => members})
345345
end
346346

347+
def get_pipeline_candidates(org_handle) when is_binary(org_handle) do
348+
case get("pipeline_candidates:#{org_handle}") do
349+
%{"ids" => ids} when is_list(ids) -> ids
350+
_ -> nil
351+
end
352+
end
353+
354+
def set_pipeline_candidates(org_handle, ids) when is_binary(org_handle) and is_list(ids) do
355+
set("pipeline_candidates:#{org_handle}", %{"ids" => ids})
356+
end
357+
347358
defp format_timestamp(datetime) do
348359
datetime
349360
|> DateTime.to_string()
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
defmodule Algora.Repo.Migrations.AddReadmeAttemptedToUsers do
2+
use Ecto.Migration
3+
4+
def change do
5+
alter table(:users) do
6+
add :readme_attempted, :boolean, default: false, null: false
7+
end
8+
9+
create index(:users, [:readme_attempted])
10+
end
11+
end
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
defmodule Algora.Repo.Migrations.AddResumeUrlToUsers do
2+
use Ecto.Migration
3+
4+
def change do
5+
alter table(:users) do
6+
add :resume_url, :string
7+
end
8+
end
9+
end
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
defmodule Algora.Repo.Migrations.AddTrackingFieldsToEmails do
2+
use Ecto.Migration
3+
4+
def change do
5+
6+
end
7+
end

0 commit comments

Comments
 (0)