Skip to content

Commit c522f39

Browse files
committed
Merge branch 'main' of github.com:briancaffey/django-step-by-step
2 parents 2b5063b + 7e08a3c commit c522f39

File tree

11 files changed

+556
-69
lines changed

11 files changed

+556
-69
lines changed

backend/backend/settings/base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@
164164

165165
CELERY_TASK_ALWAYS_EAGER = bool(int(os.environ.get("CELERY_TASK_ALWAYS_EAGER", 0)))
166166

167+
# broker_connection_retry_on_startup
168+
CELERY_BROKER_CONNECTION_RETRY_ON_STARTUP = True
169+
167170
# Internationalization
168171
# https://docs.djangoproject.com/en/3.1/topics/i18n/
169172

backend/backend/settings/development.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
INTERNAL_IPS = ["127.0.0.1"]
1919

2020
ADMIN_EMAIL = "[email protected]"
21+
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
2122

2223
NOTEBOOK_ARGUMENTS = [
2324
"--ip",

docker-compose.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ services:
115115

116116
# celery beat
117117
- PIDFILE=
118+
- TZ=America/New_York
118119
depends_on:
119120
- postgres
120121
- redis
@@ -127,6 +128,11 @@ services:
127128
- "manage.py"
128129
- "start_celery_worker"
129130
ports: []
131+
healthcheck:
132+
test: ["CMD", "celery", "--app=backend.celery_app:app", "inspect", "ping"]
133+
interval: 5s
134+
timeout: 5s
135+
retries: 5
130136

131137
celery_beat:
132138
<<: *backend
@@ -193,9 +199,11 @@ services:
193199
networks:
194200
- main
195201
depends_on:
196-
- celery_worker
202+
celery_worker:
203+
condition: service_healthy
197204
environment:
198205
- CELERY_BROKER_URL=redis://redis:6379/1
206+
- TZ=America/New_York
199207

200208
volumes:
201209
pg-data:

nuxt-app/app.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
<template>
22
<NuxtLayout>
33
<NuxtPage class="dark-mode dark" />
4-
<Toaster />
54
</NuxtLayout>
65
</template>
76

87
<script setup lang="ts">
9-
import Toaster from '@/components/ui/toast/Toaster.vue'
108
import { useAuth } from '@/composables/useAuth'
119
import { useProfile } from '@/composables/useProfile';
1210
await useAuth();

nuxt-app/composables/useChat.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,5 @@
11
import { ref } from 'vue';
22

3-
export interface Message {
4-
id: number;
5-
content: string;
6-
timestamp: string;
7-
role: string;
8-
}
9-
10-
export interface Messages {
11-
messages: Message[];
12-
session_id: number;
13-
}
14-
15-
export interface ChatResponse {
16-
messages: Message[];
17-
}
18-
19-
export interface SendMessageResponse {
20-
id: number;
21-
content: string;
22-
timestamp: string;
23-
role: string;
24-
}
25-
26-
export interface Session {
27-
session_id: number;
28-
created_at: string;
29-
}
303

314
export const useChatComposable = async () => {
325

nuxt-app/layouts/default.vue

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -86,20 +86,9 @@
8686
</DropdownMenuContent>
8787
</DropdownMenu>
8888
</div>
89-
<!-- <NavigationMenu class="flex space-x-4">
90-
91-
<Popover v-if="authStore.getIsAuthenticated">
92-
<PopoverTrigger class="text-sm font-medium transition">Logout</PopoverTrigger>
93-
<PopoverContent class="p-2 w-auto">
94-
<NuxtLink>
95-
<Button @click="logout">Logout</Button>
96-
</NuxtLink>
97-
</PopoverContent>
98-
</Popover>
99-
</NavigationMenu> -->
10089
</div>
10190
</nav>
102-
<!-- Page Content -->
91+
10392
<main class="container mx-auto px-6 py-8 pb-0">
10493
<NuxtPage />
10594
</main>
@@ -109,20 +98,6 @@
10998
<script setup lang="ts">
11099
import { storeToRefs } from 'pinia';
111100
import { CircleUser, Menu, Package2, Search } from 'lucide-vue-next'
112-
import {
113-
NavigationMenu,
114-
NavigationMenuContent,
115-
NavigationMenuItem,
116-
NavigationMenuLink,
117-
NavigationMenuList,
118-
NavigationMenuTrigger,
119-
NavigationMenuViewport,
120-
} from '@/components/ui/navigation-menu'
121-
import {
122-
Popover,
123-
PopoverContent,
124-
PopoverTrigger,
125-
} from "@/components/ui/popover"
126101
import {
127102
DropdownMenu,
128103
DropdownMenuContent,

nuxt-app/lib/utils.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

nuxt-app/nuxt.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ export default defineNuxtConfig({
2828
* Directory that the component lives in.
2929
* @default "./components/ui"
3030
*/
31-
componentDir: '@/components/ui'
31+
componentDir: './components/ui',
3232
}
3333
})

0 commit comments

Comments
 (0)